package casino;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

public class ActionMenu extends Menu {
	private Color trans = new Color(0,0,0,100);
	
	public ActionMenu(Casino c){
		super(c);
		init();
	}
	
	private void init(){
		elements.add(new MenuButton(this, 60, 775, 200, 50, "Take", 30, null){
			public void clicked(MouseEvent e){
				casino.current.taking = true;
				casino.current.choosing = false;
			}
		});
		elements.add(new MenuButton(this, 320, 775, 200, 50, "Increase", 30, null){
			public void clicked(MouseEvent e){
				casino.current.building = true;
				casino.current.choosing = false;
			}
		});
		elements.add(new MenuButton(this, 580, 775, 200, 50, "Duplicate", 30, null){
			public void clicked(MouseEvent e){
				casino.current.duplicating = true;
				casino.current.choosing = false;
			}
		});
		elements.add(new MenuButton(this, 840, 775, 200, 50, "Add", 30, null){
			public void clicked(MouseEvent e){
				casino.current.adding = true;
				casino.current.choosing = false;
			}
		});
	}
	
	public void draw(Graphics2D g){
		g.setColor(trans);
		g.fillRect(0, 700, 1100, 900);
		g.setColor(Color.black);
		g.drawRect(0, 700, 1100, 900);
		super.draw(g);
	}
	
	public void keyPress(int keycode){
		if(keycode == KeyEvent.VK_Q){
			casino.current.choosing = false;
			casino.pauseGame();
		}
	}
}
